﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using System.Collections;
/// <summary>
/// Component 的摘要说明

/// </summary>
public class Component
{

    public static IList ListTypeForEnum(DropDownList ddl, Type enumType)
    {
        ArrayList list = new ArrayList();

        foreach (int i in Enum.GetValues(enumType))
        {
            ListItem listitem = new ListItem(Enum.GetName(enumType, i), i.ToString());
            list.Add(listitem);
        }
        return list;
    }

}
